<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'listUsers.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<link rel="stylesheet" type="text/css" href="css/common.css" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css"
	href="lib/bootstrap/css/bootstrap.css">

<link rel="stylesheet" type="text/css" href="stylesheets/theme.css">
<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css">

<script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
    	function time(){
			var date = new Date();
		    var y = date.getYear() + 1900;
			var mm = date.getMonth() + 1;
			var d = date.getDate();//7
			var s = date.getSeconds();//28
            var m = date.getMinutes();//29
		    var h = date.getHours();//10
		    document.getElementById("timeTo").innerHTML = y+ "/" + mm + "/" + d + " " +h + ":" + m + ":" + s;
		    document.getElementById("time1").innerHTML = y+ "/" + mm + "/" + d + " " +h + ":" + m + ":" + s;
		    setTimeout("time()",1000);
    	}
    	$(function(){
    		$(".oneList").click(function(){
    			var id = $(this).find("td").attr("id");
    			//alert(id);
    		    window.location.href = "getUserById.action?uid=" + id;
    		});
    		//删除提示
    		$("a[name=del]").click(function(){
    			if(window.confirm("确定要删除么！")){
    				return true;
    			}else{
    				return false;
    			}
    		});
    	});
    </script>
<!-- Demo page code -->

<style type="text/css">
#line-chart {
	height: 300px;
	width: 800px;
	margin: 0px auto;
	margin-top: 1em;
}

.brand {
	font-family: georgia, serif;
}

.brand .first {
	color: #ccc;
	font-style: italic;
}

.brand .second {
	color: #fff;
	font-weight: bold;
}
</style>

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="../assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144"
	href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114"
	href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72"
	href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed"
	href="../assets/ico/apple-touch-icon-57-precomposed.png">

</head>

<body onload="time();">
	<div class="navbar">
		<div class="navbar-inner">
			<ul class="nav pull-right">

				<li><a href="#"
					class="hidden-phone visible-tablet visible-desktop" role="button">Settings</a></li>
				<li id="fat-menu" class="dropdown"><a href="#" role="button"
					class="dropdown-toggle" data-toggle="dropdown"> <i
						class="icon-user"></i> Jack Smith <i class="icon-caret-down"></i>
				</a>

					<ul class="dropdown-menu">
						<li><a tabindex="-1" href="#">My Account</a></li>
						<li class="divider"></li>
						<li><a tabindex="-1" class="visible-phone" href="#">Settings</a></li>
						<li class="divider visible-phone"></li>
						<li><a tabindex="-1" href="sign-in.html">Logout</a></li>
					</ul></li>

			</ul>
			<a class="brand" href="index.html"><span class="first">在线考试</span>
				<span class="second">系统</span></a>
		</div>
	</div>




	<div class="sidebar-nav">
		<a href="#dashboard-menu" class="nav-header" data-toggle="collapse"><i
			class="icon-dashboard"></i>用户管理<i class="icon-chevron-up"></i></a>
		<ul id="dashboard-menu" class="nav nav-list collapse in">
			<li><a href="listAllUser2.action">用户列表</a></li>
		</ul>

		<a href="#accounts-menu" class="nav-header" data-toggle="collapse"><i
			class="icon-briefcase"></i>题库管理<i class="icon-chevron-up"></i></a>
		<ul id="accounts-menu" class="nav nav-list collapse">
			<li><a href="listAllTitle">题库详情</a></li>
		</ul>

		<a href="#error-menu" class="nav-header collapsed"
			data-toggle="collapse"><i class="icon-exclamation-sign"></i>试卷管理<i
			class="icon-chevron-up"></i></a>
		<ul id="error-menu" class="nav nav-list collapse">
			<li><a href="addPaper">新增试卷</a></li>
			<li><a href="getPaperList">试卷列表</a></li>
		</ul>

		<a href="#legal-menu" class="nav-header" data-toggle="collapse"><i class="icon-legal"></i>人员管理</a>
        <ul id="legal-menu" class="nav nav-list collapse">
            <li ><a href="page/admin/adminEdit.jsp">新增管理员  </a></li>   
            <li ><a href="adminList">管理员列表</a></li>
        </ul>

	</div>

<!-- 主题部分 -->
	<div class="content">
		<div class="header">
				<h1 class="page-title">用户管理</h1>
		</div>

			<ul class="breadcrumb">
				<li><a href="index.html">用户列表</a> <span class="divider">/</span></li>
				<li class="active">所有用户</li>
			</ul>

			<div class="container-fluid">
				<div class="row-fluid">

					<div class="btn-toolbar">
						<button class="btn btn-primary">
							<i class="icon-plus"></i>
							<a href="<%=path%>/page/users/userEdit.jsp" style="color:#1b1b1b">新增用户</a>
						</button>
						<!-- <button class="btn">导入</button>
						<button class="btn">导出</button> -->
						<div class="btn-group"></div>
					</div>
					<div class="well">
						<table class="table">
							<thead>
								<tr>
									<th>#</th>
									<th>用户名</th>
									<th>真实姓名</th>
									<th>密码</th>
									<th>性别</th>
									<th>年龄</th>
									<!-- <th>生日</th> -->
									<th style="width: 26px;"></th>
								</tr>
							</thead>
							<tbody>
								<s:iterator value="list">
									<tr class="oneList">
										<td id="<s:property value="userId"/>"><s:property value="userId"/></td>
										<td><s:property value="userName" /></td>
										<td><s:property value="userRealName" /></td>
										<td><s:property value="userPassword" /></td>
										<td><s:property value="userSex" /></td>
										<td><s:property value="userAge" /></td>
										<%-- <td><s:property value="userDate.userDate" /></td> --%>
										<td>
											<!-- 修改 -->
											<a href="updateUser.action?uid=<s:property value="userId"/>"><i class="icon-pencil"></i></a>
											&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<!-- 删除 -->
											<a name="del" href="deleteUser.action?uid=<s:property value="userId"/>" role="button" data-toggle="modal"><i
													class="icon-remove"></i></a>
										</td>
								    </tr>
								</s:iterator>
							</tbody>
						</table>
						
					</div>
					<!-- 分页显示 -->
				<div class="pagination">
					<ul>
						<li><a href="listAllUser2.action?currentPage=1">首页</a></li>
						<li><a href="listAllUser2.action?currentPage=<s:property value="currentPage-1"/>">上一页</a></li>
						<li><a href="listAllUser2.action?currentPage=<s:property value="currentPage+1"/>">下一页</a></li>
						<li><a href="listAllUser2.action?currentPage=<s:property value="totalPage"/>">末页</a></li>
						
					</ul>
					<div id="totalPage" style="height:45px;width:100px; line-height: 45px; float:right; margin-right: 600px;">
					当前<span style="color:#cc3300;  font-size:19px;"><s:property value="currentPage"/></span> / <span><s:property value="totalPage"/></span>页
					</div>
				</div>
				</div>
				
				
</body>
</html>
